package com.airS.task.fileMgr.service.mgr;

import com.airS.task.fileMgr.common.page.Page;
import com.airS.task.fileMgr.example.mgr.YunfileExample;
import com.airS.task.fileMgr.model.mgr.Yunfile;
import com.airS.task.fileMgr.query.mgr.YunfileQuery;

import java.util.List;

/**
 * 云盘管理服务
 * Created by alan on 2017/3/14.
 */
public interface YunfileService {

    /**
     * 按实例ID查询
     * @param id
     * @return
     */
    Yunfile queryYunfileById(Integer id);

    /**
     * 按条件分页查询
     * @param query
     * @return
     */
    Page<Yunfile> queryYunfiles(YunfileQuery query);

    /**
     * 按条件查询
     * @param query
     * @return
     */
    List<Yunfile> queryAllYunfiles(YunfileQuery query);

    /**
     * 按条件查询,包含fileIds
     * @param query
     * @param fileIds
     * @return
     */
    List<Yunfile> queryAllYunfilesIn(YunfileQuery query, List<Integer> fileIds);

    /**
     * 文件新增
     * @param yunfile
     * @return
     */
    Integer addYunfile(Yunfile yunfile);

    /**
     * 文件修改
     * @param yunfile
     * @return
     */
    Integer updateYunfileById(Yunfile yunfile);

    /**
     * 根据条件修改文件
     * @param yunfile
     * @return
     */
    Integer updateYunfileByExampleSelective(Yunfile yunfile, YunfileExample example);

    /**
     * 按实例ID物理删除
     * @param id
     * @return
     */
    Integer delYunfileById(Integer id);
}
